#include <iostream>
#include <fcntl.h>

using namespace std;

int main(int argc,char *argv[])
{
   int devnullfd = open("/dev/null",O_RDWR);
   int stderrfd = dup(2);
   dup2(devnullfd,2);
   cerr << "Kannaiyan is a bad guy" << endl;
   dup2(stderrfd,2);
   cerr << "Kannaiyan is a nice guy" << endl;
   close(devnullfd);
}
